package me.zhengjie.modules.website.domain;

import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotBlank;
import lombok.Data;
import me.zhengjie.base.BaseEntity;

import javax.persistence.*;

/**
 *
 *
 * @author system
 * @since 2024-12-02 16:18:43
 */
@Entity
@Data
@Table(name = "access_logs" )
@ApiModel(value = "AccessLogs", description = " ")
public class AccessLogs extends BaseEntity implements Serializable{

    private static final long serialVersionUID=1L;

    /**
     *
     */
    @Id
    @Column(name = "log_id" )
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     *所属ip
     */
    @Column(name = "ip_address" )
    @NotBlank(message = "所属ip不能为空")
    private String ipAddress;

    /**
     *访问时间
     */
    @Column(name = "visit_time" )
    @NotBlank(message = "访问时间不能为空")
    private LocalDateTime visitTime;

    /**
     *访问页面
     */
    @Column(name = "page" )
    @NotBlank(message = "访问页面不能为空")
    private String page;

    /**
     * 所属地
     */
    @Column(name = "location")
    @NotBlank(message = "所属地不能为空")
    private String location;

}